package com.physics.mps.module.abaqus;

import com.physics.mps.entity.enums.CodeEnum;
import com.physics.mps.entity.vo.OpenAbaqusFileVo;
import com.physics.mps.entity.vo.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.*;

/**
 * @author mcsoft
 * @since 2023/8/22
 */
@Deprecated
@Slf4j
@RestController
@RequiredArgsConstructor
@Api(tags = "abaqus")
@RequestMapping(value = "abaqus")
public class AbaqusController {


    // ~ Variable & Constant
    // ========================================================================================================


    // ~ Public method
    // ========================================================================================================

    @PostMapping(value = "openAbaqusFile")
    public ResponseResult openAbaqusFile(@RequestBody OpenAbaqusFileVo openAbaqusFileVo) throws IOException, InterruptedException {
        return abaqusService.openAbaqusFile(openAbaqusFileVo);
    }

    @PostMapping(value = "runAbaqusCommand")
    @ApiOperation(value = "runAbaqusCommand")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "header", name = "authorization", value = "authorization", dataType = "String", required = true)
    })
    public ResponseResult runAbaqusCommand() {
        return null;
    }

    // ~ Override method
    // ========================================================================================================


    // ~ Private method
    // ========================================================================================================


    // ~ Autowired
    // ========================================================================================================

    private final AbaqusService abaqusService;

    private final ExecutorService readOdbExecutorService;


}
